package com.dk.springmvc.ajax.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/e")
public class ExceptionController {

    /**
     * 测试空指针异常
     */
    @GetMapping("/nullPoint")
    @ResponseBody
    public void nullPointerException(String nullV) {
        System.out.println(nullV.length());
    }

    /**
     * 测试空指针异常
     */
    @GetMapping("/other")
    @ResponseBody
    public void otherException() {
        System.out.println(1/0);
    }




}
